<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basedata/basedata/base_meritpay.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basedata/basedata/base_meritpay.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'meritpay_id',
                footer: "Foots",
                cnName: '绩效工资配置',
                name: 'basedata/base_meritpay',
                url: "/base_meritpay/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({"process_id":"","unit_id":"","product_id":"","unitprice":"","standardnumber":"","standardhour":"","standardminute":"","standardsecond":""});
            const editFormOptions = ref([[{"dataKey":"process","data":[],"title":"工序名称","field":"process_id","type":"select"}],
                              [{"dataKey":"unitlist","data":[],"title":"报工单位","field":"unit_id","type":"select"}],
                              [{"dataKey":"productList","data":[],"title":"产品名称","field":"product_id","type":"select"}],
                              [{"title":"工资单价","field":"unitprice","type":"decimal"}],
                              [{"title":"标注产出","field":"standardnumber","type":"number"},
                               {"title":"","field":"standardhour","type":"number"},
                               {"title":"","field":"standardminute","type":"number"},
                               {"title":"","field":"standardsecond","type":"number"}]]);
            const searchFormFields = ref({"process_id":"","unit_id":"","product_id":"","unitprice":""});
            const searchFormOptions = ref([[{"dataKey":"process","data":[],"title":"工序名称","field":"process_id","type":"select"},{"dataKey":"unitlist","data":[],"title":"报工单位","field":"unit_id","type":"select"}],[{"dataKey":"productList","data":[],"title":"产品名称","field":"product_id","type":"select"},{"title":"工资单价","field":"unitprice","type":"number"}]]);
            const columns = ref([{field:'meritpay_id',title:'主键Id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'process_id',title:'工序名称',type:'int',bind:{ key:'process',data:[]},width:110,align:'left',sort:true},
                       {field:'unit_id',title:'报工单位',type:'int',bind:{ key:'unitlist',data:[]},width:110,align:'left'},
                       {field:'product_id',title:'产品名称',type:'int',bind:{ key:'productList',data:[]},width:110,align:'left'},
                       {field:'unitprice',title:'工资单价',type:'decimal',link:true,width:110,align:'left'},
                       {field:'standardnumber',title:'标注产出',type:'int',width:110,align:'left'},
                       {field:'standardhour',title:'standardhour',type:'int',width:110,align:'left'},
                       {field:'standardminute',title:'standardminute',type:'int',width:110,align:'left'},
                       {field:'standardsecond',title:'standardsecond',type:'int',width:110,align:'left'},
                       {field:'CreateID',title:'创建人编号',type:'int',width:120,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建时间',type:'datetime',width:120,align:'left',sort:true},
                       {field:'Creator',title:'创建人',type:'string',width:120,align:'left'},
                       {field:'Modifier',title:'修改人',type:'string',width:120,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:120,align:'left',sort:true},
                       {field:'ModifyID',title:'修改人编号',type:'int',width:120,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
